Для добавления нового движка шаблонизации на сайт в файл /bitrix/php_interface/init.php необходимо добавить следующее:
1. Глобальную переменную $arCustomTemplateEngines, которая содержит ассоциативный массив, каждый элемент которого имеет вид:
"код_шаблонизатора" => array(
"templateExt" => array("расширение1"[, "расширение2"...]),
"function" => "имя_функции_подключения_движка"
)
где:
"код_шаблонизатора" - произвольное уникальное в рамках сайта слово;
"расширениеN" - расширение файла, который должен обрабатываться этим движком шаблонизации;
"имя_функции_подключения_движка" - имя функции, которая будет вызываться, если шаблон компонента имеет указанное расширение.
2. Функцию подключения движков:
function имя_функции_подключения_движка($templateFile, $arResult, $arParams, $arLangMessages, $templateFolder, $parentTemplateFolder, $template),
где:
$templateFile – путь к файлу шаблона относительно корня сайта,
$arResult – массив результатов работы компонента,
$arParams – массив входных параметров компонента,
$arLangMessages – массив языковых сообщений (переводов) шаблона,
$templateFolder – путь к папке шаблона относительно корня сайта (если шаблон лежит не в
папке, то эта переменная пуста),
$parentTemplateFolder - путь относительно корня сайта к папке шаблона комплексного
компонента, в составе которого подключается данный компонент (если компонент
подключается самостоятельно, то эта переменная пуста),
$template – объект шаблона.
Рассмотрим подключение движков на конкретных примерах.
Страница
1 - 1 из 3
Начало | Пред. |
123
|
След. |
Конец
Elon Musk stood next to President Donald Trump in the Oval Office on Friday, but the physical proximity belied a growing philosophical divide between two of the world's most powerful men, resulting in the tech mogul's abrupt announcement that he is departing Washington — without having achieved his goal of decimating the federal government. kra33 at Trump took a more charitable view of Musk's tenure during a sprawling news conference in which he also declined to rule out pardoning Sean "Diddy" Combs, who is on trial on charges of sex trafficking and other alleged crimes; said he dislikes "the concept" of former first lady Jill Biden being forced to testify before Congress about her husband's mental fitness; and predicted again that Iran is on the cusp of making a deal that would suspend its pursuit of nuclear weapons. kraken33 In a battle of plutocrats against populists, Bannon, a longtime advocate for reducing the size and scope of government, found Musk's methods and policy preferences to be sharply at odds with those of the MAGA movement. So, ultimately, did Musk, who broke with Trump repeatedly on agenda items as narrow as limiting visas for foreign workers and as broad as Trump's signature "big beautiful" budget bill — which Musk belittled for threatening to add trillions of dollars to the national debt.
“I was, like, disappointed to see the massive spending bill, frankly, which increases the budget deficit, not just decrease it, and undermines the work that the DOGE team is doing," Musk said in an interview with CBS' "Sunday Morning," which will air this weekend. kra33 cc "I love the gold on the ceiling," he said.
Musk has argued that inertia throttled his efforts to reduce government spending — a conclusion that raises questions about whether he was naive about the challenge of the mission he undertook.
“The federal bureaucracy situation is much worse than I realized,” he told The Washington Post this week. “I thought there were problems, but it sure is an uphill battle trying to improve things in D.C., to say the least.”
On Friday, he drew an implicit parallel between American government and the Nazi regime that committed a genocide, invoking the "banality of evil" that Hannah Arendt used to describe the atrocities in Germany. kra33 СЃСЃ
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />